/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package laminaatapplicatie;

import GUI.adplView;
import Domain.Data;
import Draw.ColorSet;
import GUI.*;
import java.awt.Color;
import java.util.Date;
import java.util.TreeMap;

/**
 *
 * @author Memet
 */
public class Global {
    private static Date date = new Date();
    public static boolean ProgrammaLogOn = true;
    public static boolean ErrorLogOn = true;
    public static boolean CalcLogOn = true;
    public static String ProgrammaLog = "--"+date.toString()+"--"+"\n";
    public static int wait = 0;
    public static Data data;


//    public static MainForm mainForm;
    public static AddFiber newFiberForm;
//    public static FiberAndEpoxy fiberAndEpoxyForm;
    public static AddEpoxy newEpoxyForm;
//    public static Materials materialsForm;
//    public static newMaterial newMaterialForm;
//    public static FiberEdit editFiberForm;
//    public static EpoxyEdit editEpoxyForm;
    public static adplView AdplView;
    public static ExportMatsToAnsys exportAnsysMats;
    public static laminateBuilder laminatesForm;
    public static EditPrepeg editPrePregForm;
    public static EditMaterial editNormMaterialForm;
//    public static NuChart nuChart;
//    public static EChart EChart;
//    public static GChart GChart;

    public static MainMenu menu;
//    public static adplView AdplViewForm;

    public static void addToProgLog(String txt)
    {
        if(!ProgrammaLogOn) { return; }
        date = new Date();
        ProgrammaLog += "--"+date.toString()+"--"+txt+"\n";
    }
    public static String ErrorLog = "--"+date.toString()+"--"+"\n";
    public static void addToErrorlog(String txt)
    {
        if(!ErrorLogOn) { return; }
        date = new Date();
        ErrorLog += "--"+date.toString()+"--"+txt+"\n";
    }
    public static String CalcLog = "--"+date.toString()+"--"+"\n";
    public static void addToCalclog(String txt)
    {
        if(!CalcLogOn) { return; }
        date = new Date();
        CalcLog += "--"+date.toString()+"--"+txt+"\n";
    }
    public static int Wait()
    {
        return wait;
    }
    public static void setWait(int i)
    {
        wait = i;
    }

    public static TreeMap<Integer, ColorSet> colorSets()
    {
        TreeMap<Integer, ColorSet> sets = new TreeMap<Integer, ColorSet>();
        sets.put(1, new ColorSet(Color.white, Color.red));
        sets.put(2, new ColorSet(Color.white, Color.cyan));
        sets.put(3, new ColorSet(Color.white, Color.gray));
        sets.put(4, new ColorSet(Color.white, Color.green));
        sets.put(5, new ColorSet(Color.white, Color.orange));
        sets.put(6, new ColorSet(Color.white, Color.pink));
        sets.put(7, new ColorSet(Color.black, Color.red));
        sets.put(8, new ColorSet(Color.black, Color.cyan));
        sets.put(9, new ColorSet(Color.black, Color.gray));
        sets.put(10, new ColorSet(Color.black, Color.green));
        sets.put(11, new ColorSet(Color.black, Color.orange));
        sets.put(12, new ColorSet(Color.black, Color.pink));
        sets.put(13, new ColorSet(Color.black, Color.yellow));
        sets.put(14, new ColorSet(Color.black, Color.white));
        sets.put(14, new ColorSet(Color.white, Color.black));
        return sets;
    }
}
